<?php
namespace Amis\form;

use Amis\type\Api;

class InputArray extends FormItem
{
    public string $type = 'array';

    public function items(Api $api)
    {
        $this->items = $api;
        return $this;
    }

    public function addable(bool $addable)
    {
        $this->addable = $addable;
        return $this;
    }

    public function removable(bool $removable)
    {
        $this->removable = $removable;
        return $this;
    }

    public function draggable(bool $draggable = false)
    {
        $this->draggable = $draggable;
        return $this;
    }

    public function draggableTip(string $draggableTip)
    {
        $this->draggableTip = $draggableTip;
        return $this;
    }

    public function addButtonText(string $addButtonText = '新增')
    {
        $this->addButtonText = $addButtonText;
        return $this;
    }

    public function minLength(int $minLength)
    {
        $this->minLength = $minLength;
        return $this;
    }

    public function maxLength(int $maxLength)
    {
        $this->maxLength = $maxLength;
        return $this;
    }
}